package com.aizuda.boot.modules.business.contract.entity;

import com.aizuda.boot.modules.common.constant.enums.CcTargetSource;
import com.aizuda.boot.modules.common.constant.enums.CcTriggerTimeEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 审批节点自动抄送设置实体类
 *
 * @Author sangyirong
 * @Version 1.0
 * @Date 2025/5/20 13:36
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("workflow_node_cc")
public class WorkflowNodeCcEntity {

    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "抄送设置ID")
    private Integer id;

    @Schema(description = "节点ID，关联 workflow_node 表")
    private Integer nodeId;

    @Schema(description = "抄送时机（进入节点时和离开节点时）")
    private CcTriggerTimeEnum ccTriggerTime;

    @Schema(description = "抄送目标来源（指定人员、指定角色、上级、部门负责人、表单内人员）")
    private CcTargetSource ccTargetSource;

    @Schema(description = "抄送目标来源配置 (如用户/角色ID，表单字段名，这块配置建议用 json 存储)")
    private String ccTargetSourceConfig;

    @Schema(description = "创建时间")
    private Date createdAt;

    @Schema(description = "更新时间")
    private Date updatedAt;

    @Schema(description = "删除标识（0：否[默认]，1：是）")
    @TableLogic
    private Boolean isDeleted;
} 